import { createRouter, createWebHistory, RouteRecord } from 'vue-router'
import zhineng from '../pages/zhineng.vue'
import jiuye from '../pages/jiuye.vue'
import anfang from '../pages/anfang.vue'
import shebei from '../pages/shebei.vue'


const routes = [
    {
        path: '/',
        name: 'zhineng',
        component: zhineng
    },
    {
        path: '/jiuye',
        name: 'jiuye',
        component: jiuye
    },
    {
        path: '/anfang',
        name: 'anfang',
        component: anfang
    },
    {
        path: '/shebei',
        name: 'shebei',
        component: shebei
    }
]


const router = createRouter({
    history: createWebHistory(),
    routes
})

router.beforeEach((to, from, next) => {
    console.log('navigating to:', to.path);
    next()
})

export default router;